<template>
    <div class="mian">
        <a-form :inline="false" :model="formData" :label-col="{ span: 6 }" :wrapper-col="{ span: 14 }" size="small"
            labelAlign="left">
            <a-form-item label="测试表单">
                <a-input v-model="formData.name"></a-input>
            </a-form-item>
            <a-form-item label="测试表单">
                <a-input v-model="formData.code"></a-input>
            </a-form-item>
            <a-form-item>
                <a-button @click="submitForm">提交</a-button>
            </a-form-item>
        </a-form>
    </div>
</template>

<script>
import { definitionStart, getProcessVariables, readXml, getFlowViewer } from "../../components/process/api/definition";
export default {
    data() {
        return {
            formData: {}
        }
    },
    props: {
        procDefId: {
            type: String,
            required: true
        }
    },
    methods: {
        submitForm() {
            definitionStart(this.procDefId, JSON.stringify(this.formData)).then(res => {
                console.log(res)
                if (res.code === 200) {
                    this.$message.success(res.msg)
                } else {
                    this.$message.error(res.msg)
                }

            })
        }
    }
}
</script>

<style lang="less" scoped>
.mian{
    width: 1200px;
    margin: auto;
    margin-top: 20px;
}
</style>